
#include <stdlib.h>
#include <portdef.h>
#include <ucl.h>
#include <VerixTimer.h>

#include <define.h>


#ifndef COMMOBJ_H
#define COMMOBJ_H

class CommObject
{
public:

    // Variables
    VS_BOOL fLinkUp;
    
    //Constructor
	CommObject();

	//Methods
	int inBegin(void *, int, VS_BOOL);
	int inCheck(void *);
	int inSend(void *, char *, int, VS_BOOL, int, long);
	int inReceive(void *, char *, int, int, long);
	int inFlush(void);		//as old API keep it even if no match
	int inEnd(void *);

	void setUCL_Object(CUcl* UCL_Obj);
	CUcl* getUCL_Object();
	
protected:	
	// CUcl Pointer to hold the UCL Object
	CUcl* UCL_Obj;
	CVerixCommTimer* timer;

};

extern CommObject CobCommunication;


#endif //COMMSHANDLER_H
